from django.contrib import admin

# Register your models here.

from .models import Task
from .models import FundTransactionRecord
from .models import FundRecord
from .models import StockTransactionRecordBak

admin.site.register(Task)

@admin.register(FundRecord)
class FundRecordAdmin(admin.ModelAdmin):
    search_fields = ("fund_id__startswith",)
    list_display = ('fund_id', 'fund_cn_name', 'fund_type')

@admin.register(FundTransactionRecord)
class FundRecordAdmin(admin.ModelAdmin):
    search_fields = ("fund_id__startswith",)
    list_display = ('fund_id', 'date', 'average_nav', 'accumulated_net', 'daily_growth_rate', 'subscription_status', 'redemption_status')

@admin.register(StockTransactionRecordBak)
class StockTransactionRecordAdmin(admin.ModelAdmin):
    search_fields = ("stock_id__startswith",)
    list_display = ('stock_id', 'day', 'open_price', 'high', 'low', 'close', 'ma_price5')
